package com.shoppingmall.activity.home;

import android.os.Bundle;
import android.view.View;
import android.widget.RelativeLayout;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.zyh.toolslib.base.BaseActivity;
import com.example.zyh.toolslib.widget.TitleBar;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.shoppingmall.R;
import com.shoppingmall.widget.RecycleGridDivider;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * liangwanbo
 */

public class ShopListactivity extends BaseActivity {

    @BindView(R.id.title_bar)
    TitleBar titleBar;
    @BindView(R.id.re_tob)
    RelativeLayout reTob;
    @BindView(R.id.rv_searchresult_list)
    RecyclerView rvSearchresultList;
    @BindView(R.id.smart_refresh)
    SmartRefreshLayout smartRefresh;
    private BaseQuickAdapter<String, BaseViewHolder> mAdapter;
    @Override
    protected int initLayout() {
        return R.layout.activity_shaop_list;
    }

    @Override
    protected void initView() {
        titleBar.setTitle("商家列表");
        titleBar.setLeftLayoutClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ShopListactivity.this.finish();
            }
        });
    }

    @Override
    protected void initData() {
        List<String> list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            list.add("");
        }
        mAdapter=new BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_searchresult_shop,list) {
            @Override
            protected void convert(@NonNull BaseViewHolder baseViewHolder, String s) {

            }
        };

        rvSearchresultList.setLayoutManager(new LinearLayoutManager(this));
        rvSearchresultList.addItemDecoration(new RecycleGridDivider());
        rvSearchresultList.setAdapter(mAdapter);
    }

    @Override
    protected void initEvent() {

    }


}
